﻿@model IEnumerable<AutoPartsSearch.Domain.Entities.Contact>
@{
    ViewBag.Title = "Index";
    Layout = "~/Areas/Administration/Views/_Layout.cshtml";
}

<h2>Index</h2>
<table id="step1" class="table-form">
        <thead>
            <tr>
                <th></th>
                <th>Id</th>
                <th>Пользователь</th>
                <th>Email</th>
                <th>Телефон</th>
                <th>Комментарий</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var dict in Model)
            {
                <tr>
                    <td>@Html.ActionLink("Детали", "Details", "Contacts", new {id = dict.Id }, null)</td>
                    <td>@dict.Id</td>
                    <td>@dict.Name</td>
                    <td>@dict.Email</td>
                    <td>@dict.Phone</td>
                    <td>@(dict.Comments.Length > 30 ? dict.Comments.Substring(0, 30) + " ..." : dict.Comments)</td>
                </tr>
            }
        </tbody>
    </table>